// 封装消息框

import { ElMessage } from 'element-plus'

// 成功提示框
export const $msg_s = (message, duration=2000) => {
    ElMessage({
        message,
        duration,
        type: 'success',
        showClose: true
      })
}

// 警告提示框
export const $msg_w = (message, duration=2000) => {
    ElMessage({
        message,
        duration,
        type: 'warning',
        showClose: true
      })
}

// info提示框
export const $msg_i = (message, duration=2000) => {
  ElMessage({
      message,
      duration,
      type: 'info',
      showClose: true
    })
}

// 错误提示框
export const $msg_e = (message, duration=2000) => {
    ElMessage({
        message,
        duration,
        type: 'error',
        showClose: true
      })
}
